/**
  ioServer.java is part of Marioneta.

  Marioneta is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License.

  Marioneta is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
  
  @author martin
   Martin Edmundo Barriga Orozco, 2008
   martin.barriga@gulmore.org
  
  ioServer: La funcion de este servidor es la transferencia de los eventos que
  se capturan en el Frame
 */

package escritorioremoto;

import java.net.Socket;
import java.io.IOException;

public class ioServer extends netUtils{

    //Contructor usado en contexto de globalServer
    public ioServer( Socket sk, int id ){
        this.initVal( sk, id );
    }
    
    //Contructor usado en contexto sin globalServer
    public ioServer( Socket sk ){
        this.initVal( sk, 0 );
    }
    
    @Override
    public void initProc(){
        try{
            this.sendStr("*** Bienvenido al servidor ***");
            this.sendStr( "" +  this.getID() );
            System.out.println( this.recibeStr() );
        }
        catch(IOException e){
            System.out.println("initProc: "+ e.getMessage() );
        }
    }
}
